<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 内联事件 -->
    <!-- 
        data-自定义属性名
     -->
    <button id="btn"  data-aid="123456" onclick="go(event)">btn</button>
    <script>
        /* 
        定义data-aid="123456"
        获取自定义属性值 event.target.dataset.aid 
        */
        function go(event){
            console.log("hello world");
            console.log(event.target.dataset.aid)
        }
    </script>
</body>
</html>